//
//  HD_HSP_Web_ViewController.m
//  HDLiaoNingMeseum
//
//  Created by HDHaoShaoPeng on 2017/8/7.
//  Copyright © 2017年 HDNiuKuiming. All rights reserved.
//

#import "HD_HSP_Web_ViewController.h"

@interface HD_HSP_Web_ViewController ()
@property (strong, nonatomic) IBOutlet UIWebView *myWebView;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;

@end

static HDDeclare *declare;
@implementation HD_HSP_Web_ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    declare = [HDDeclare sharedDeclare];
    
    self.titleLabel.text = self.myTitle;
    self.titleLabel.font = [UIFont fontWithName:@"FZQKBYSJW--GB1-0" size:18.0];
    
//    if (self.isOnLine) {
//        NSURL *url = [NSURL URLWithString:self.urlPath];
//        NSURLRequest *request = [NSURLRequest requestWithURL:url];
//        [self.myWebView loadRequest:request];
//    }
//    else
//    {
//        NSString *tempFilePath = [NSString stringWithFormat:@"%@/%@/%@.html",declare.catch_path,declare.language.uppercaseString,self.filePath];
        NSString *htmlString = [NSString stringWithContentsOfFile:self.filePath encoding:NSUTF8StringEncoding error:nil];
        [self.myWebView loadHTMLString:htmlString baseURL:[NSURL URLWithString:self.filePath]];
//    }
    
}

- (void)dealloc
{
    [self.myWebView removeFromSuperview];
    self.myWebView = nil;
}

- (IBAction)backClicked:(id)sender {
    [self.navigationController popViewControllerAnimated:YES];
}



@end
